/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.tb_car_info.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.tb_car_info.entity.TbCarInfo;
import com.thinkgem.jeesite.modules.tb_car_info.dao.TbCarInfoDao;

/**
 * 车辆管理Service
 * @author ZhangYangZe
 * @version 2017-05-14
 */
@Service
@Transactional(readOnly = true)
public class TbCarInfoService extends CrudService<TbCarInfoDao, TbCarInfo> {
	/**
	 * 获取单条数据
	 * @param String id
	 * @return TbCarInfo
	 */
	public TbCarInfo get(String id) {
		return super.get(id);
	}
	/**
	 * 获取列表数据
	 * @param String id
	 * @return TbCarInfo
	 */
	public List<TbCarInfo> findList(TbCarInfo tbCarInfo) {
		return super.findList(tbCarInfo);
	}
	/**
	 * 查询分页数据
	 * @param TbCarInfo
	 * @param Model
	 * @param HttpServletRequest
	 * @return String
	 */
	public Page<TbCarInfo> findPage(Page<TbCarInfo> page, TbCarInfo tbCarInfo) {
		return super.findPage(page, tbCarInfo);
	}
	/**
	 * 添加或修改车辆
	 * @param TbCarInfo
	 */
	@Transactional(readOnly = false)
	public void save(TbCarInfo tbCarInfo) {
		super.save(tbCarInfo);
	}
	/**
	 * 删除车辆
	 * @param TbCarInfo
	 */
	@Transactional(readOnly = false)
	public void delete(TbCarInfo tbCarInfo) {
		super.delete(tbCarInfo);
	}
	/**
	 * 获取车辆详情
	 * @param String
	 * @return ArrayList<TbCarInfo>
	 */
	@Transactional(readOnly = true)
	public ArrayList<TbCarInfo> carDetails(String carnum){
		return dao.carDetails(carnum);
	}
	/**
	 * 获取车辆不在包括特定编号的车辆编号 
	 * @param List<String> list
	 * @return List<String> 
	 */
	@Transactional(readOnly = true)
	public List<TbCarInfo> besidesCarnum(List<String> list){
		return dao.besidesCarnum(list);		
	}
}